import Demo.demo1;
import Demo.demoController;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryExtensionsKt;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.io.ClassPathResource;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 666
 * Date: 2023-07-18
 * Time: 15:08
 */
public class Test {
    public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
   //     BeanFactory  beanFactory = new XmlBeanFactory(new ClassPathResource("spring-config.xml"));
     //    demo1 d1  =(demo1) context.getBean("test");
        demoController d2 = (demoController) context.getBean("demoController");
        System.out.println(d2.SayHi("朱承星"));
    }
}
